#ifndef VDATA_HASH_H
#define VDATA_HASH_H

/*
 **************************************************************************
 *                                                                        *
 *          General Purpose Hash Function Algorithms Library              *
 *                                                                        *
 * Author: Arash Partow - 2002                                            *
 * URL: http://www.partow.net                                             *
 * URL: http://www.partow.net/programming/hashfunctions/index.html        *
 *                                                                        *
 * Copyright notice:                                                      *
 * Free use of the General Purpose Hash Function Algorithms Library is    *
 * permitted under the guidelines and in accordance with the most current *
 * version of the Common Public License.                                  *
 * http://www.opensource.org/licenses/cpl1.0.php                          *
 *                                                                        *
 **************************************************************************
*/
#include "includes.h"

#define PJW_STRING_00 0x05794CC2 //ProVer
#define PJW_STRING_01 0x04875CC2 //AppVer
#define PJW_STRING_02 0x00005767 //Pow
#define PJW_STRING_03 0x00005454 //Mod
#define PJW_STRING_04 0x059C9ABD //SetTem
#define PJW_STRING_05 0x0005ABA4 //SvSt
#define PJW_STRING_06 0x0005A6B7 //SrEg
#define PJW_STRING_07 0x004C96F4 //ErrId

#define DJB_STRING_00 0xCAC8F9E3 //ProVer
#define DJB_STRING_01 0xA7A7F3D3 //AppVer
#define DJB_STRING_02 0x0B8815FB //Pow
#define DJB_STRING_03 0x0B880925 //Mod
#define DJB_STRING_04 0xD0DFEA97 //SetTem
#define DJB_STRING_05 0x7C8C9415 //SvSt
#define DJB_STRING_06 0x7C8C8136 //SrEg
#define DJB_STRING_07 0x0D200CDB //ErrId

typedef unsigned int (*hash_function)(char*, unsigned int len);

unsigned int RSHash  (char* str, unsigned int len);
unsigned int JSHash  (char* str, unsigned int len);
unsigned int PJWHash (char* str, unsigned int len);
unsigned int ELFHash (char* str, unsigned int len);
unsigned int BKDRHash(char* str, unsigned int len);
unsigned int SDBMHash(char* str, unsigned int len);
unsigned int DJBHash (char* str, unsigned int len);
unsigned int DEKHash (char* str, unsigned int len);
unsigned int BPHash  (char* str, unsigned int len);
unsigned int FNVHash (char* str, unsigned int len);
unsigned int APHash  (char* str, unsigned int len);

int get_hash_index(char *string);
#endif // VDATA_HASH_H

